POV-Ray : Newsgroups : povray.general : Testing whether a shape intersects with another : Re: Testing whether a shape intersects with another Server Time
31 Jul 2024 04:26:11 EDT (-0400)
  Re: Testing whether a shape intersects with another  
From: Jan Dvorak
Date: 4 Nov 2007 10:47:44
Message: <472de9a0@news.povray.org>
M_a_r_c napsal(a):

> web.472dcf35dc25d7085a2aacfe0@news.povray.org...
>> Does anyone know a way of accomplishing this?  I've looked and looked, and 
>> I
>> realise I might be missing something very obvious...
>>
> What is obvious is that you did not make a research about the word "inside" 
> in the pov documentaion :-)
> 
> Marc 
> 
> 
what is obvious is that you missed he doesn't test for a point. He tests 
for an object being inside another.

One idea is to choose a point where the inner surface is seen completely 
when unoccluded and then trace it together with the other object. If all 
of your rays hit the object you know it's not being intersected by the 
other object, hoping not to miss anything. Then use inside() to know 
whether it is completely inside or completely outside. There is no 
general algorithm to find out if two objects have non-null intersection.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.